package de.koller.worlders.engine.entity.zone;

import de.koller.worlders.engine.entity.mo.MovingObject;
import de.koller.worlders.engine.tiles.ITile;
import de.koller.worlders.engine.tiles.data.ITileCreator;
import de.koller.worlders.render.VisualMap;
import de.koller.worlders.render.visual.DisplayRenderObject;

public class NormalizerZone extends ZoneEffect {
	public static final int GEN_ID = 7;
	
	public static final ITileCreator GEN_INSTANCE = new ITileCreator() {
		@Override public ITile newInstance() {
			return new Zone().addEffect( new NormalizerZone() );
		}
		
		@Override public DisplayRenderObject getIcon() { return VisualMap.normalizer; }
		@Override public String getName() { return "Normalisierer"; }
	};
	
	@Override
	public void init( Zone z ) {
//		z.setTextureRep( new TextureRep( "data/tiles.png", 384, 0, 32, 32 ) );
		z.getTile().setVisual( VisualMap.normalizer );
	}

	@Override
	public void enter( MovingObject mo ) {
		super.enter( mo );
		
		//mo.getForce().setY( MovingObject.GRAVITY );
		mo.mostate.setGravityInversed( false );
	}
	
}
